<template>
	<view style=" background-color: aliceblue; border-radius: 10rpx;">
		<text class="titlebox" style="text-size-adjust: 10rpx;">{{title}}</text>
		<slot name="tips"></slot>
		<view class="tipsbox">
			<text style="color: #f00;" v-if="isTop">置顶</text>
			<text style="color: #00f;" v-if="mode==3">广告</text>
			<text>{{author}}</text>
			<!-- <text :style="authorColor">{{author}}</text> -->
			<text v-if="mode!=3">{{comments}}评</text>
			<view style="flex:1; display: flex; justify-content: flex-end;">
				<text>{{time}}</text>
			</view>
		</view>
		<view style="flex: 1; display: flex; justify-content: flex-end;">
		</view>
	</view>
</template>

<script>
	export default {
		props:{
					title:{
						type:String,
						default:"新闻标题",
						require:true
					},
					isTop:{
						type:Boolean,
						default:false,
						require:true
					},
					author:{
						type:String,
						default:"来源",
						require:true
					},
					comments:{
						type:Number,
						default:0,
						require:true
					},
					time:{
						type:String,
						default:"2025.10.25"
					}
				},
		

		name:"cardViewText",
		data() {
			return {
				
			};
		}
	}
</script>

<style>
.tipsbox {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		text-align: center;
		padding-left: 10px;
		margin-top: 15px;
	}

	.tipsbox text {
		margin-right: 10px;
		color: #aaa;
		font-size: 11px;
	}
</style>